import  request  from "../utils/request";

//查询
export const queryStuApi = (name,degree,clazzId,page,pageSize) =>{
  return request.get(`/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`);
}

//添加
export const addStuApi = (stu) =>{
  return request.post('/students',stu)
}

//查询回显
export const queryByIdApi = (id) =>{
  return request.get(`/students/${id}`);
}

//修改
export const updateStuApi = (stu) =>{
  return request.put('/students',stu)
}

//删除
export const deleteStuApi = (ids)=>{
  return request.delete(`/students/${ids}`)
}
// 违纪处理

export const violApi = (id,score)=>{
  return request.put(`/students/violation/${id}/${score}`)
}